package com.yl.chainStore.mapper.pay

import com.yl.chainStore.entity.pay.PayCustomerAccount;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper
import org.apache.ibatis.annotations.Param

/**
 * <p>
 * 用户账户表（金额之类的数据） Mapper 接口
 * </p>
 *
 * @author cxw
 * @since 2021-07-30
 */
@Mapper
interface PayCustomerAccountMapper : BaseMapper<PayCustomerAccount> {

	/**
	 * 添加余额
	 */
	fun addBalance(
		@Param("customerId") customerId: Long,
		@Param("subCompanyId")subCompanyId:Long,
		@Param("money") money: Long
	)

	/**
	 * 扣除余额
	 */
	fun subBalance(
		@Param("customerId") customerId: Long,
		@Param("subCompanyId")subCompanyId:Long,
		@Param("money") money: Long
	)

	/**
	 * 添加积分
	 */
	fun addIntegral(
		@Param("customerId") customerId: Long,
		@Param("subCompanyId")subCompanyId:Long,
		@Param("integral") integral: Long
	)

	/**
	 * 扣除积分
	 */
	fun subIntegral(
		@Param("customerId") customerId: Long,
		@Param("subCompanyId")subCompanyId:Long,
		@Param("integral") integral: Long
	)
	/**
	 * 添加欠款金额
	 */
	fun addAmountOwed(
		@Param("customerId")customerId: Long,
		@Param("subCompanyId")subCompanyId:Long,
		@Param("amountOwed")amountOwed: Long
	)

	/**
	 * 扣除欠款金额
	 */
	fun subAmountOwed(
		@Param("customerId")customerId: Long,
		@Param("subCompanyId")subCompanyId:Long,
		@Param("amountOwed")amountOwed: Long
	)

	/**
	 * 添加馈赠金
	 */
	fun addGiftsOfGold(
		@Param("customerId")customerId: Long,
		@Param("subCompanyId")subCompanyId:Long,
		@Param("giftsOfGold")giftsOfGold: Long
	)

	/**
	 * 扣除馈赠金
	 */
	fun subGiftsOfGold(
		@Param("customerId")customerId: Long,
		@Param("subCompanyId")subCompanyId:Long,
		@Param("giftsOfGold")giftsOfGold: Long
	)


}
